<template>
  <!-- <div class="demo2">attr</div> -->
  <!-- <ChidDemo></ChidDemo>
  <div >attr2</div> -->
  <div @click="printSelf">self</div>
</template>
<script setup>
import { useAttrs } from 'vue';
import ChidDemo from './ChidDemo.vue'

defineProps(['title','money'])
const attrs = useAttrs()
// {class:"demo"}
console.log("attrs==>",attrs.class);

const printSelf = ()=>{
  console.log('self.....');
}
</script>

<script>
  export default{
    // 禁止透传
    inheritAttrs:false
  }
</script>


<style>
.demo2{
  color:  green;
}
</style>